<%@ page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<jsp:directive.page import="com.lg.system.CTurnPage" />
<%@ include file="/jsp/jscommom.jsp"%>
<%@ include file="/jsp/admintop.jsp"%>

<html>
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
		<title>新闻管理</title>
		<link href="/css/login.css" rel="stylesheet" type="text/css" />
	</head>
	<script type="text/javascript">
function domethod(){
document.forms[0].submit();
}

function goto(url){
window.open(url,"_blank");
}
</script>
	<%
		CTurnPage mPage = new CTurnPage();
		mPage = (CTurnPage) request.getAttribute("page");
	%>
	<body>
		<html:form action="/system/admin/news/viewnewsissue" method="post">
			<div align="center">
				<table width="97%" border="0" align="center" cellpadding="0"
					cellspacing="1" class="line1">
					<tr>
						<td colspan="4" class="titlebg">
							新闻管理
						</td>
					</tr>

					<tr>
						<td class="mtdtitle1">
							新闻标题
						</td>
						<td class="mtdtextleft">
							<html:text property="newsTitle" styleClass="input1"></html:text>
						</td>

						<td class="mtdtitle1">
							类型
						</td>

						<td class="mtdtextleft">
							<html:select property="newsType" styleClass="input1">
							<html:option value="">
									全部
								</html:option>
								<html:option value="0">
									最新动态
								</html:option>
								<html:option value="1">
									职场攻略
								</html:option>
								<html:option value="2">
									传媒博览
								</html:option>
								<html:option value="3">
									政策法规
								</html:option>
								<html:option value="5">
									现场招聘
								</html:option>
								<html:option value="19">
									毕业生频道
								</html:option>
								<html:option value="20">
									网站注释
								</html:option>
								<html:option value="21">
									走马灯
								</html:option>
							</html:select>
						</td>
					</tr>

					<tr>
						<td colspan="4" class="mthmidtext">
							<input value="查询" type="button" class="tbutton"
								onclick="domethod()" />
						</td>
					</tr>

					<tr>
						<td align="center" colspan="4">
							<table width="100%" border="0" align="center" cellpadding="0"
					cellspacing="1" class="line1">
								<tr>
									<td class="mtdtextleft" colspan="4">
										<input value="增加" type="button" class="tbutton"
											onclick="goto('/system/admin/news/newsissue.do')" />
									</td>
								</tr>

								<tr>
									<td class="titlebg" colspan="4">
										新闻列表
									</td>
								</tr>

								<tr>
									<td class="mtdtitle1">
										编号
									</td>
									<td class="mtdtitle1">
										标题
									</td>
									<td class="mtdtitle1">
										类型
									</td>
									<td class="mtdtitle1">
										发布时间
									</td>
								</tr>

								<logic:empty name="page" property="sqlList">
									<tr>
										<td align="center" colspan="4" class="mthmidtext">
											没有可显示的内容!

										</td>
									</tr>
								</logic:empty>
								<logic:notEmpty name="page" property="sqlList">
									<logic:iterate type="com.ibatis.po.system.TNews" id="newsList"
										name="page" property="sqlList" indexId="index">
										<tr style="cursor:hand"
											onclick="goto('/system/admin/news/editnewsissue.do?newsId=${newsList.id }')">
											<td class="mtdtextcenterwrite">
												${newsList.id }
											</td>
											<td class="mtdtextcenterwrite">
												${newsList.title }
											</td>
											<td class="mtdtextcenterwrite">
												<logic:equal value="0" name="newsList"
													property="kindOfNewsId">最新动态</logic:equal>
												<logic:equal value="2" name="newsList"
													property="kindOfNewsId">传媒博览</logic:equal>
												<logic:equal value="3" name="newsList"
													property="kindOfNewsId">政策法规</logic:equal>
													<logic:equal value="1" name="newsList"
													property="kindOfNewsId">职场攻略</logic:equal>
													<logic:equal value="5" name="newsList"
													property="kindOfNewsId">现场招聘</logic:equal>
													<logic:equal value="19" name="newsList"
													property="kindOfNewsId">毕业生频道</logic:equal>
													<logic:equal value="20" name="newsList"
													property="kindOfNewsId">网站注释</logic:equal>
													<logic:equal value="21" name="newsList"
													property="kindOfNewsId">走马灯</logic:equal>
											</td>
											<td class="mtdtextcenterwrite">
												<bean:write name="newsList" property="issueDate"
													format="yyyy-MM-dd" />
											</td>
										</tr>
									</logic:iterate>
								</logic:notEmpty>
								<tr>
									<td colspan="4" class="mtdtitle1">
										<table width='100%'>
											<tr>
												<td class="left">
													<%=mPage.getPageInfo()%>
												</td>
												<td class="right">
													<%=mPage.getTurnPageLink()%>
												</td>
											</tr>
										</table>
									</td>
								</tr>
							</table>
						</td>
					</tr>
				</table>
			</div>
		</html:form>
	</body>
</html>
